package br.com.news.database.daos.interfaces;

import java.util.List;

import br.com.news.database.entities.NoticiaEntity;
import br.com.news.database.exception.DataBaseException;
import br.com.news.database.utils.interfaces.IGenericDao;

public interface INoticiaDao extends IGenericDao<NoticiaEntity, Long>{

	List<NoticiaEntity> getUltimasNoticias(int qntNoticias,long idCategoria) throws DataBaseException;
	
	List<NoticiaEntity> getUltimasNoticiasXml(int qntNoticias) throws DataBaseException;
	
	List<NoticiaEntity> getNoticiasAnteriores(int qntNoticias, long idNoticia, long idCategoria) throws DataBaseException;
	
	List<NoticiaEntity> getNoticiasAnterioresXml(int qntNoticias, long idCategoria) throws DataBaseException;
	
	List<NoticiaEntity> findLastNews(long idNoticia, long idCategoria) throws DataBaseException;

	public boolean existeNoticia(NoticiaEntity noticia);

	NoticiaEntity findNoticiaById(Long id);

	Long quantidadePaginas(long idCategoria);

	List<NoticiaEntity> findNoticiasPorPagina(int linha, Long idCategoria,int quantidade);

	List<NoticiaEntity> buscaNoticiaPorNome(String nome);
	
	NoticiaEntity findImageByIdNoticia(Long idNoticia) throws DataBaseException ;
	
	List<NoticiaEntity> findByExample(NoticiaEntity noticiaEntity);

}
